package com.linkhub.oms.data.sync.api.wms.domain.response;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @Description: StoreProcessCreateResponse
 * @Author: [Your Name]
 * @Date: [Date]
 * @Version: 1.0.0
 */
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
public class StoreProcessCreateResponse extends WmsBaseResponse implements Serializable {
    /**
     * Response对象
     */
    @JSONField(name = "response")
    private Response response;

    /**
     * 获取响应标志
     */
    @Override
    protected String getFlag() {
        return response != null ? response.getFlag() : null;
    }

    /**
     * Response内部类
     */
    @Data
    @NoArgsConstructor
    public static class Response {
        /**
         * 状态标志，success或failure
         */
        @JSONField(name = "flag")
        private String flag;

        /**
         * 响应代码
         */
        @JSONField(name = "code")
        private int code;

        /**
         * 响应消息
         */
        @JSONField(name = "message")
        private String message;
    }
}
